package com.zxy.ziems.server.board.controller;

import com.zxy.btp.common.response.JsonResponse;
import com.zxy.ziems.server.board.pojo.vo.DeviceStatusVo;
import com.zxy.ziems.server.board.service.EntiretyBoardService;
import com.zxy.ziems.server.constant.enums.DictCodeEnum;
import com.zxy.ziems.server.service.DictItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 生产看板
 */
@RestController
@RequestMapping("/api/dataBoard/product")
public class ProductBoardController {

    @Autowired
    private EntiretyBoardService entiretyBoardService;
    @Autowired
    private DictItemService dictItemService;

    /**
     * 设备状态及值
     *
     * @return
     */
    @GetMapping("getDeviceVal")
    public JsonResponse<List<DeviceStatusVo>> getDeviceVal() {
        // 获取配置设备
        return JsonResponse.SUCCESS(entiretyBoardService.deviceStatus(DictCodeEnum.PRODUCT_BOARD));
    }
}
